From af26daf317b9aae8f00d85f438d1b98545e0a235 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 6 May 2005 08:24:37 +0000 Subject: [PATCH] bitkeeper revision 1.1389.5.22 (427b29c5KNOxlBYIMC4Z37mPKVY6HA) More acpi cleanups. Fix 'acpi=ht'. Signed-off-by: Keir Fraser --- .../arch/xen/i386/kernel/acpi/Makefile | 4 ++++ .../arch/xen/i386/kernel/acpi/boot.c | 6 ------ .../arch/xen/i386/kernel/mpparse.c | 13 ++++++++++++- .../arch/xen/i386/kernel/setup.c | 8 ++++---- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile index a14d2e88d1..9254f472f2 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile @@ -7,3 +7,7 @@ c-link := $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)): @ln -fsn $(srctree)/arch/i386/kernel/acpi/$(notdir $@) $@ +obj-y += $(c-obj-y) $(s-obj-y) + +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link)) +clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link)) diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c index d169b3c684..2c7211bb4f 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c @@ -672,10 +672,6 @@ acpi_parse_madt_lapic_entries(void) { int count; -#ifdef CONFIG_XEN - return 0; -#endif - /* * Note that the LAPIC address is obtained from the MADT (32-bit value) * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). @@ -871,9 +867,7 @@ acpi_boot_table_init(void) } #ifdef __i386__ -#ifndef CONFIG_XEN check_acpi_pci(); -#endif #endif acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c index 8f701413a5..16f2ee8c80 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c @@ -109,7 +109,7 @@ static int MP_valid_apicid(int apicid, int version) { return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf; } -#else +#elif !defined(CONFIG_XEN) static int MP_valid_apicid(int apicid, int version) { if (version >= 0x14) @@ -119,6 +119,7 @@ static int MP_valid_apicid(int apicid, int version) } #endif +#ifndef CONFIG_XEN void __init MP_processor_info (struct mpc_config_processor *m) { int ver, apicid; @@ -217,6 +218,12 @@ void __init MP_processor_info (struct mpc_config_processor *m) apic_version[m->mpc_apicid] = ver; bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; } +#else +void __init MP_processor_info (struct mpc_config_processor *m) +{ + num_processors++; +} +#endif /* CONFIG_XEN */ static void __init MP_bus_info (struct mpc_config_bus *m) { @@ -816,12 +823,14 @@ void __init find_smp_config (void) void __init mp_register_lapic_address ( u64 address) { +#ifndef CONFIG_XEN mp_lapic_addr = (unsigned long) address; if (boot_cpu_physical_apicid == -1U) boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); +#endif } @@ -841,6 +850,7 @@ void __init mp_register_lapic ( if (id == boot_cpu_physical_apicid) boot_cpu = 1; +#ifndef CONFIG_XEN processor.mpc_type = MP_PROCESSOR; processor.mpc_apicid = id; processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR)); @@ -851,6 +861,7 @@ void __init mp_register_lapic ( processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; processor.mpc_reserved[0] = 0; processor.mpc_reserved[1] = 0; +#endif MP_processor_info(&processor); } diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c index d4c5597001..72b9206b75 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c @@ -1567,6 +1567,10 @@ void __init setup_arch(char **cmdline_p) if (efi_enabled) efi_map_memmap(); + op.cmd = PHYSDEVOP_SET_IOPL; + op.u.set_iopl.iopl = current->thread.io_pl = 1; + HYPERVISOR_physdev_op(&op); + /* * Parse the ACPI tables for possible boot-time SMP configuration. */ @@ -1584,10 +1588,6 @@ void __init setup_arch(char **cmdline_p) register_memory(); - op.cmd = PHYSDEVOP_SET_IOPL; - op.u.set_iopl.iopl = current->thread.io_pl = 1; - HYPERVISOR_physdev_op(&op); - if (xen_start_info.flags & SIF_INITDOMAIN) { if (!(xen_start_info.flags & SIF_PRIVILEGED)) panic("Xen granted us console access " -- 2.30.2